package com.test.parking;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.Month;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;

public class App3 {
    public static void main(String[] args) {
        LocalDateTime startDate = LocalDateTime.of(
                2023, Month.JULY, 21,10,11);
        System.out.println("开始时间  : " + startDate);

        LocalDateTime endDate = LocalDateTime.of(
                2023, Month.JULY, 22,00,11);
        System.out.println("结束时间 : " + endDate);

        long diff = ChronoUnit.HOURS.between(startDate, endDate);
        System.out.println("相差   : " + diff);
    }
}
